#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
int main() {
    int i = 0, j = 0;
    double arr[5] = { 0.0 }, sum = 0.0;
    for (i = 0; i < 5; i++)
    {
        sum = 0.0;
        for (j = 0; j < 5; j++)
        {
            scanf("%lf", &arr[j]);
            sum += arr[j];
        }
        for (j = 0; j < 5; j++)
        {
            printf("%.1lf ", arr[j]);
        }
        printf("%.1lf", sum);
        printf("\n");
    }
    return 0;
}